package com.trg.designmodel.factory.methodfactory.order;

import com.trg.designmodel.factory.methodfactory.pizza.BJCheessPizza;
import com.trg.designmodel.factory.methodfactory.pizza.BJPepperPizza;
import com.trg.designmodel.factory.methodfactory.pizza.Pizza;

/**
 * @ClassName: BJOrderPizza
 * @Description:
 * @Author: tangrg
 * @Date: 2021/7/1 14:52
 * @Version: 1.0
 * @Return:
 **/
public class BJOrderPizza extends OrderPizza {
    @Override
    Pizza createPizza(String orderType) {
        Pizza pizza = null;
        if ("cheess".equals(orderType)) {
            pizza = new BJCheessPizza();
        } else if ("pepper".equals(orderType)) {
            pizza = new BJPepperPizza();
        }
        return pizza;

    }
}
